import Login from '../views/denglu/Login.vue';
import Register from '../views/zhuce/Register.vue';
import EmailVerification from '../views/zhuce/EmailVerification.vue';
import ResetPassword from '../views/chongzhimima/ResetPassword.vue';


import Profile from '../views/gerenzhongxin/Profile.vue';
import Applications from '../views/duijie/Applications.vue';

import EnterpriseDashboard from '../views/shouye/EnterpriseDashboard.vue'; // 暂未迁移
import TalentSearch from '../views/rencaiku/TalentSearch.vue';


import EnterpriseSpace from '../views/qiyekongjian/EnterpriseSpace.vue';
import ApplicationRecords from '../views/qiyekongjian/ApplicationRecords.vue';
import DemandDetail from '../views/qiyekongjian/DemandDetail.vue';
import MessageCenter from '../views/qiyekongjian/MessageCenter.vue';
import AccountSettings from '../views/qiyekongjian/AccountSettings.vue';

export const routes = [
  {
    path: '/',
    name: 'home',
    redirect: '/login'
  },
  {
    path: '/login',
    name: 'login',
    component: Login
  },
  {
    path: '/xueshengdenglu',
    name: 'xueshengdenglu',
    redirect: '/login'
  },
  {
    path: '/qiyedenglu',
    name: 'qiyedenglu',
    redirect: '/login'
  },
  {
    path: '/register',
    name: 'register',
    component: Register
  },
  {
    path: '/email-verification',
    name: 'email-verification',
    component: EmailVerification
  },
  {
    path: '/reset-password',
    name: 'reset-password',
    component: ResetPassword
  },
  {
    path: '/profile',
    name: 'profile',
    component: Profile,
    meta: { requiresAuth: true }
  },
  {
    path: '/applications',
    name: 'applications',
    component: Applications,
    meta: { requiresAuth: true }
  },
  {
    path: '/use/messages',
    name: 'use-messages',
    component: () => import('../views/enterprise/Notifications.vue'),
    meta: { requiresAuth: true }
  },
  {
    path: '/use/home',
    name: 'use-home',
    component: () => import('../views/gerenzhongxin/UserHome.vue'),
    meta: { requiresAuth: true }
  },
  {
    path: '/use/enterprise-demand',
    name: 'use-enterprise-demand',
    component: () => import('../views/gerenzhongxin/EnterpriseDemand.vue'),
    meta: { requiresAuth: true }
  },

  {
    path: '/henterprise/home',
    name: 'enterprise-home',
    component: () => import('../views/enterprise/NewEnterpriseHome.vue'),
    meta: { requiresAuth: true, role: 'enterprise' }
  },

  {
    path: '/code/enterprise/certification',
    name: 'enterprise-certification',
    component: () => import('../views/qiyezhengxin/Certification.vue'),
    meta: { requiresAuth: true, role: 'enterprise' }
  },
  {
    path: '/code/enterprise/certification/form',
    name: 'enterprise-certification-form',
    component: () => import('../views/qiyezhengxin/CertificationForm.vue'),
    meta: { requiresAuth: true, role: 'enterprise' }
  },
  {
    path: '/code/enterprise/info',
    name: 'enterprise-info',
    component: () => import('../views/gongsixinxi/Info.vue'),
    meta: { requiresAuth: true, role: 'enterprise' }
  },
  {
    path: '/code/enterprise/post',
    name: 'enterprise-post',
    component: () => import('../views/fabuxuqiu/Post.vue'),
    meta: { requiresAuth: true, role: 'enterprise' }
  },

  {
    path: '/code/enterprise/applications',
    name: 'enterprise-applications',
    component: () => import('../views/qiyeqiyexuqiu/Applications.vue'),
    meta: { requiresAuth: true, role: 'enterprise' }
  },
  {
    path: '/code/enterprise/talent-search',
    name: 'talent-search',
    component: TalentSearch,
    meta: { requiresAuth: true, role: 'enterprise' }
  },

  {
    path: '/code/enterprise/space',
    name: 'enterprise-space',
    component: EnterpriseSpace,
    meta: { requiresAuth: true, role: 'enterprise' }
  },
  {
    path: '/code/enterprise/application-records',
    name: 'enterprise-application-records',
    component: ApplicationRecords,
    meta: { requiresAuth: true, role: 'enterprise' }
  },
  {
    path: '/code/enterprise/demand-detail/:demandId',
    name: 'enterprise-demand-detail',
    component: DemandDetail,
    meta: { requiresAuth: true, role: 'enterprise' }
  },
  {
    path: '/code/enterprise/messages',
    name: 'enterprise-messages',
    component: MessageCenter,
    meta: { requiresAuth: true, role: 'enterprise' }
  },
  {
    path: '/code/enterprise/settings',
    name: 'enterprise-settings',
    component: AccountSettings,
    meta: { requiresAuth: true, role: 'enterprise' }
  },
  {
    path: '/code/enterprise/notifications',
    name: 'enterprise-notifications',
    component: () => import('../views/enterprise/Notifications.vue'),
    meta: { requiresAuth: true, role: 'enterprise' }
  },
  {
    path: '/verify-email',
    name: 'verify-email',
    component: () => import('../views/zhuce/VerifyEmail.vue')
  },
];